<template>
<div class="app1">
    <van-nav-bar title="分类" />
    <div class="head">
      <div class="headmin">
        <nav @click="go1" class="zuo" v-if="a()">
          <div class="headimg2"></div>
          <span>已经登录</span>
        </nav>
        <nav @click="go" class="zuo" v-else>
          <div class="headimg"></div>
          <span>登录/注册</span>
        </nav>
       <!--  <div class="headup">
          <ul>
            <li>
              <p v-if="a()">200</p>
              <p v-else>0.00</p>
              <span>余额</span>
            </li>
            <li>
              <p>0.00</p>
              <span>积分</span>
            </li>
          </ul>
        </div> -->
      </div>
    </div>
    <div class="dingdan">
      <div class="ding">
        <b>我的订单</b>
        <span>全部订单<van-icon class="arrow" name="arrow"/></span>
      </div>
      <ul class="dan">
        <li>
          <div></div>
          <span @click="fukuan">待付款</span>
        </li>
        <li>
          <div></div>
          <span>待发货</span>
        </li>
        <li>
          <div></div>
          <span>待收货</span>
        </li>
        <li>
          <div></div>
          <span>已完成</span>
        </li>
        <li>
          <div></div>
          <span>退货/售后</span>
        </li>
      </ul>
    </div>
    <div class="dingdan">
      <div class="ding">
        <b>我的服务</b>
      </div>
      <ul class="dan">
        <li @click="dizhi">
          <div></div>
          <span>地址管理</span>
        </li>
        <li>
          <div></div>
          <span>我的收藏</span>
        </li>
        <li>
          <div></div>
          <span>我的秒杀</span>
        </li>
        <li>
          <div></div>
          <span>我的推广</span>
        </li>
        <li>
          <div></div>
          <span>我的拼图</span>
        </li>
      </ul>
    </div>
   <!--  <ul class="like">
      <p>猜你喜欢</p>
      <li v-for="item in categories" :key="item._id">
        <img :src="item.coverImg" alt="分类图片" />
        <i>{{ item.name }}</i>
        <div><b>42积分</b><span>月销 8058笔</span></div>
      </li>
    </ul> -->
  </div>
</template>

<script>

export default {
  name: "like",
  data() {
    return {
      categories: [],
    };
  },
  methods: {
    go() {
      this.$router.push({ path: "/login" });
    },
    go1() {
      this.$router.push({ path: "/Personal" });
    },
    dizhi() {
      this.$router.push({ path: "/Dizhi" });
    },
    fukuan() {
      this.$router.push({ path: "/Waitpay" });
    },
    a() {
      if (sessionStorage.getItem("token")) {
        return 1;
      } else {
        return 0;
      }
    },
  },
  
};
</script>
<style lang="scss" scoped>
.qiandao,
.dingdan,
.like {
  padding-left: 10px;
}
.head {
  position: relative;
  width: 375px;
  height: 130px;
  background: url("../../assets/img/111.png") no-repeat center;
  box-sizing: border-box;
  padding-left: 11px;
  padding-top: 17px;
  margin-bottom: 59px;
  .headmin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .zuo {
      display: flex;
      align-items: center;
      span {
        width: 72px;
        height: 24px;
        color: rgba(253, 253, 253, 1);
        font-size: 16px;
        line-height: 150%;
        text-align: left;
        font-weight: bold;
        margin-left: 14px;
      }
    }
  }
  .headimg,
  .headimg2 {
    width: 52px;
    height: 52px;
    border-radius: 26px;
    border: rgba(255, 255, 255, 1) solid 2px;
  }
  .headimg2 {
    background: url("../../assets/img/2.jpg") no-repeat center;
    background-size: contain;
  }

  .qiandao {
    width: 96px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.45);
    border-radius: 18px 0 0 18px;

    .icon {
      color: rgba(245, 245, 245, 1);
      margin-bottom: -50px;
      font-size: 14px;
      text-align: left;
      line-height: 150%;
      font-weight: bold;
    }
  }
}
.headup {
  position: absolute;
  width: 355px;
  height: 87px;
  left: 11px;
  top: 97px;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 8px;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.1428571428571429);
  text-align: center;
  ul {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    li {
      p {
        color: rgba(56, 56, 56, 1);
        font-size: 18px;
        font-weight: bold;
        margin: 0;
      }
      span {
        color: rgba(166, 166, 166, 1);
        font-size: 12px;
      }
      .arrow {
        font-size: 20px;
      }
    }
  }
}
.dingdan {
  box-sizing: border-box;
  width: 355px;
  padding-top: 20px;
  margin-bottom: 6px;
  .ding {
    display: flex;
    justify-content: space-between;
    b {
      color: rgba(0, 0, 0, 1);
      font-size: 18px;
      line-height: 150%;
      text-align: left;
    }
    span {
      color: rgba(80, 80, 80, 1);
      font-size: 12px;
      line-height: 150%;
      text-align: left;
    }
  }
  .dan {
    display: flex;
    justify-content: space-around;
    div {
      width: 45px;
      height: 45px;
      color: rgba(80, 80, 80, 1);
      background-color: rgba(255, 87, 51, 1);
      border-radius: 23px;
      font-size: 14px;
      line-height: 150%;
      text-align: center;
      margin-top: 6px;
      margin-bottom: 9px;
    }
    span {
      color: rgba(80, 80, 80, 1);
      font-size: 12px;
      line-height: 150%;
      text-align: center;
      margin-left: 5px;
    }
  }
}
.like {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  p {
    width: 100%;
    color: rgba(0, 0, 0, 1);
    font-size: 18px;
    line-height: 150%;
    text-align: left;
    font-weight: bold;
  }
  li {
    box-sizing: border-box;
    width: 178px;
    height: 246px;
    padding: 7px 7px 0 6px;
    img {
      width: 165px;
      height: 149px;
    }
    i {
      font-style: normal;
      color: rgba(80, 80, 80, 1);

      line-height: 150%;
      text-align: left;
    }
    div {
      width: 100%;
      display: flex;
      justify-content: space-between;
      b {
        color: rgba(212, 48, 48, 1);
        line-height: 150%;
        text-align: left;
        font-weight: normal;
      }
      span {
        color: rgba(102, 102, 102, 1);
        font-size: 12px;
        line-height: 150%;
        text-align: right;
      }
    }
  }
}
</style>

